package com.hshx.client;

import com.hshx.VO.DeptVo;
import com.hshx.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "gateway",
        path = "/systemService",
        contextId = "DeptClient")
public interface DeptClient {
    @RequestMapping("/getAllDept")
    List<Dept> getAllDept();

    @RequestMapping("/addDept")
    boolean addDept(@SpringQueryMap Dept dept);

    @RequestMapping("/removeDept")
    boolean removeDept(@RequestParam(name = "dept_id") int dept_id);

    @RequestMapping("/updateDept")
    boolean updateDept(@SpringQueryMap Dept dept);

    @RequestMapping("/getDeptOne")
    Dept getDeptOne(@RequestParam(name = "dept_id") int dept_id);

    @RequestMapping("/getDeptVoList")
    public List<DeptVo> getDeptVoList();
}
